package main

import (
	"log"
	"sort"
)

func main() {
	data_m := make(map[int]int)
	data_m[1] = 111
	data_m[2] = 222
	data_m[3] = 333
	keys := make([]int, 0, len(data_m))
	for k := range data_m {
		keys = append(keys, k)
	}

	sort.Slice(keys, func(i, j int) bool {
		return keys[i] < keys[j]
	})

	for _, val := range keys {
		log.Println(data_m[val])
	}

	data_set := make(map[int]bool)
	data_set[1] = true
	data_set[2] = true
	if val, ok := data_set[3]; !ok {
		log.Println("key not exist")

	} else {
		log.Println("val is ", val)
	}

}
